package com.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

    /**
     * 获取格式化的当前日期。yyyyMMdd; yyyy-MM-dd HH:mm:ss
     * @param format
     * @return
     */
    public static String getFormatCurrentTime(String format) {
        SimpleDateFormat dateFormat = new SimpleDateFormat(format);
        return dateFormat.format(new Date());
    }

    public static String getCurrentSystemTimeMillis() {
        return String.valueOf(System.currentTimeMillis());
    }
}
